﻿/**
 * 验证
 */
import flash.utils.ByteArray;
import flash.net.FileReference;
import flash.display.BitmapData;
import flash.display.Bitmap;
function joins( arg, mtkey) {
	var str:String = 'AS';
	if (! (arg is ByteArray || arg is FileReference || arg is BitmapData || arg is Bitmap)) {
		if ( arg is Boolean || (arg === null) || (arg === undefined)) {
			str += '';
		}else if ( arg is String || arg is Number) {
			str += 'T' + mtkey + arg.toString().replace(/[^0-9a-z]/ig, '');
		}else{
			var keys = [];
			for (var key in arg) {
				keys.push( key);
			}
			keys.sort();//控制按键名排�?
			for (var i = 0; i < keys.length; i++) {
				str += (keys[i] + '=' + joins( arg[keys[i]], mtkey));
			}
		}
	}
	return str;
}